#include <iostream>
#include <cstring>
using namespace std;

class Person
{
protected:
  char Name[10];
  char Sex;
  int Age;

public:
  void Register(char *name, int age, char sex);
  void ShowMe();
};

class Teacher : public Person
{
private:
  char Dept[20];
  int Salary;

public:
  Teacher(char *name, int age, char sex, char *Dept, int Salary) 
  {
    Register( name,  age,  sex);
    strcpy(this->Dept, Dept);
    this-> Salary = Salary;
  }

  void ShowMe()
  {
    Teacher::ShowMe();
    cout << Salary;
  }
};

